<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<div>
    <input type="text" id="input">
    <button>计算</button>
    <div>
        计算结果:
        <div id="showValue">

        </div>
    </div>
<!--  编写一个计算公式  -->
    <script>
        var input = document.getElementById('input');
        var btn = document.getElementsByTagName('button')[0];
        btn.onclick = function () {
            var str = input.value;
            // 展示计算结果至id=showValue的div中
            document.getElementById('showValue').innerHTML = parseInt(str) / 1440 * 1080;
        }
    </script>
</div>
</body>
</html>